package com.busionline.wotu.baselibrary.mvp.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;

import com.busionline.wotu.baselibrary.base.BaseActivity;
import com.busionline.wotu.baselibrary.mvp.IBaseView;
import com.busionline.wotu.baselibrary.mvp.proxy.IPresenterProxy;


/**
 * mvp activity基类
 *@author woochen123
 *@time 2018/1/19 11:43
 *@desc
 */

public abstract class BaseMvpActivity extends BaseActivity implements IBaseView {
    IPresenterProxy mPresenterProxy;


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mPresenterProxy = new ActivityPresenterProxyImpl<>(this);
        mPresenterProxy.bindPresenter();
    }


    @Override
    protected void onDestroy() {
        super.onDestroy();
        mPresenterProxy.unbindPresenter();
    }

}
